package com.lingxin.gps.wap.command;

import com.alibaba.fastjson.JSONObject;
import com.lingxin.gps.sdk.GpsDeviceApi;
import com.pisces.core.BaseCommand;

/**
 *
 */
public class CUserInfo extends BaseCommand {

	private Long uid;
	private String token;

	@Override
	public void init() throws Exception {
		uid = context.getAttr("uid");
		token = context.getAttr("token");
	}

	@Override
	public void doCommand() throws Exception {
		JSONObject resData = GpsDeviceApi.userInfo(uid, token);
		data.put("currentUser", resData.getJSONObject("currentUser"));
	}

}
